<?php

$term = $_REQUEST['q'];
$link = mysql_connect("localhost", "totoramysql","totoratest"); /* Conecto a la base de datos */
mysql_select_db("totoratest", $link);  /* Seleccion la base de datos */
$sql="SELECT name, email FROM usuarios WHERE name LIKE '%$term%'";
$result = mysql_query($sql, $link);
while ($fila = mysql_fetch_assoc($result)) {
    echo $fila['name']." [".$fila['email']."]<br />\n ";
}
?>